﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TCCT_CTC_CSDLDangVienV1
{
    public partial class frmCanBoKhac : frmBase
    {
        public string SelectedDauMoiID = "";

        public frmCanBoKhac()
        {
            InitializeComponent();
        }

        private void frmCanBoKhac_Load(object sender, EventArgs e)
        {
            ApplyUI();
        }

        private void ApplyUI()
        {

          
            UI.TextBox.ApplyDefault(txtNoi_Dung);
            
            UI.TextBox.ApplyDefault(txtThang_SK);

            UI.Button.ApplyAccept(btnAccept);
            UI.Button.ApplyCancel(btnCancel);

        }

        private void btnAccept_Click(object sender, EventArgs e)
        {

            this.DialogResult = DialogResult.OK;
            this.Close();

        }

        private void txtThang_SK_Leave(object sender, EventArgs e)
        {
            TextEdit txtTem = (TextEdit)sender;
            if (!IsNull(txtTem) && !MyCommon.MyDateTime.IsMonthYear(txtTem.Text))
            {
                txtTem.Text = "";
                MessageBox.Show("Tháng năm không đúng định dạng. ví dụ: 01/2013");
                txtTem.Focus();
            }
        }
 
         

    }
}